package com.financing.wap.dao.impl;


import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Repository;
import com.financing.wap.dto.DstUserVisitLogDTO;
import com.financing.wap.dao.IDstUserVisitLogDao;
import com.financing.wap.common.SqlName;
/**
 * dst_user_visit_log  
 * 用户访问文章记录 数据访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("dstUserVisitLogDao")
public class DstUserVisitLogDaoImpl extends BaseDaoImpl<DstUserVisitLogDTO, java.lang.Integer> implements IDstUserVisitLogDao {


	@Override
	public int insert(DstUserVisitLogDTO dstUserVisitLog) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.insert(SqlName.DstUserVisitLogSql.insert, dstUserVisitLog);
	}

	@Override
	public void update(DstUserVisitLogDTO dstUserVisitLog) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.DstUserVisitLogSql.update, dstUserVisitLog);
	}

	@Override
	public void updateForce(DstUserVisitLogDTO dstUserVisitLog) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.DstUserVisitLogSql.updateForce, dstUserVisitLog);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		this.sqlMapClientTemplate.delete(SqlName.DstUserVisitLogSql.delete,id);
	}
	
	@SuppressWarnings("unchecked")	
	@Override
	public List<DstUserVisitLogDTO> queryList(DstUserVisitLogDTO dstUserVisitLog) throws SQLException {
		return this.sqlMapClientTemplate.queryForList(SqlName.DstUserVisitLogSql.queryList, dstUserVisitLog);
	}

	@Override
	public int queryListCount(DstUserVisitLogDTO dstUserVisitLog) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.queryForObject(SqlName.DstUserVisitLogSql.queryListCount, dstUserVisitLog);
	}

	@Override
	public DstUserVisitLogDTO loadById(Integer id) throws SQLException {
		return  (DstUserVisitLogDTO)this.getSqlMapClientTemplate().queryForObject(SqlName.DstUserVisitLogSql.loadById,id);
	}

	@Override
	public Class<DstUserVisitLogDTO> getEntityClass() {
		return DstUserVisitLogDTO.class;
	}
 	
}
